import request from '@/utils/request'

export function getMyPaperList(data) {
  return request({
    url: '/achievement/UserGetRelateAchievement',
    method: 'post',
    data
  })
}
export function getUserConsults(data) {
  return request({
    url: '/achievement/UserGetRelateAchievement',
    method: 'post',
    data
  })
}

export function thesis_add(data) {
  return request({
    url: '/achievement/addAchievement',
    method: 'post',
    data
  })
}

export function thesis_add2(data) {
  return request({
    url: '/achievement/UpdateAchievement',
    method: 'post',
    data
  })
}

export function thesis_delete(achievementID) {
  return request({
    url: '/achievement/deleteAchievement',
    method: 'get',
    params: { achievementID }
  })
}

export function thesis_commit(achievementID) {
  return request({
    url: '/achievement/ReCommitAchievement',
    method: 'post',
    params: { achievementID }
  })
}

// 撤回咨询报告
export function thesis_withdraw(achievementID) {
  return request({
    url: '/achievement/WithdrawAchievement',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    params: { achievementID }
  })
}

export function get_thesis_author(id) {
  return request({
    url: '/achievementAuthor/selectauthor',
    method: 'get',
    params: { id }
  })
}

export function thesis_author_add(data) {
  return request({
    url: '/achievementAuthor/addauthor',
    method: 'post',
    data
  })
}

export function thesis_author_edit(data) {
  return request({
    url: '/achievementAuthor/updateauthor',
    method: 'post',
    data
  })
}

export function thesis_author_delete(id) {
  return request({
    url: '/achievementAuthor/deleteauthor',
    method: 'get',
    params: { id }
  })
}

// 院级审核
export function thesis_pass_yuanji(PaID) {
  return request({
    url: '/achievement/CollegeCheckPass',
    method: 'get',
    params: { PaID }
  })
}

export function thesis_back_yuanji(data) {
  return request({
    url: '/achievement/CollegeCheckBack',
    method: 'post',
    data
  })
}

// 校级审核
export function thesis_pass_xiaoji(PaID) {
  return request({
    url: '/achievement/SchoolCheckPass',
    method: 'get',
    params: { PaID }
  })
}

export function thesis_back_xiaoji(data) {
  return request({
    url: '/achievement/SchoolCheckBack',
    method: 'post',
    data
  })
}

export function thesis_author_edit_xiaoji(data) {
  return request({
    url: '/achievementAuthor/updateauthor',
    method: 'post',
    data
  })
}

export function update_thesis_source(data) {
  return request({
    url: '/achievementQualification/upAchievementScore',
    method: 'post',
    data
  })
}

// 附件
export function file_add(data) {
  return request({
    url: '/achievement/addachievementfile',
    method: 'post',
    data
  })
}

export function get_file(id) {
  return request({
    url: '/achievement/pageachievementfileCondition',
    method: 'get',
    params: { id }
  })
}

export function file_delete(id) {
  return request({
    url: '/achievement/Deleteachievementfile',
    method: 'get',
    params: { id }
  })
}

// 量化
export function getCascadingData(params) {
  return request({
    url: '/achievementType/getCascadingData',
    method: 'get',
    params
  })
}

export function getQulification(AchievementID) {
  return request({
    url: '/achievementQualification/getAchievementQulification',
    method: 'get',
    params: { AchievementID }
  })
}

export function deleteQulification(AchievementQualificationID) {
  return request({
    url: '/achievementQualification/deleteAchievementQulification',
    method: 'get',
    params: { AchievementQualificationID }
  })
}

export function addQulification(data) {
  return request({
    url: '/achievementQualification/addAchievementQualification',
    method: 'post',
    data
  })
}

export function GetPaperDTOById(achievementID) {
  return request({
    url: '/achievement/GetAchievementById',
    method: 'get',
    params: { achievementID }
  })
}

// 导出接口
export function getMyPaperListExport(data) {
  return request({
    url: '/achievement/export',
    method: 'post',
    data
  })
}
